package com.ecloud.gardensterminal.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ecloud.gardensterminal.controller.dto.GardensDeviceAreaDto;
import com.ecloud.gardensterminal.controller.dto.GardensDeviceDto;
import com.ecloud.gardensterminal.controller.vo.GardensDeviceAreaVo;
import com.ecloud.gardensterminal.domain.GardensDevice;

import java.util.List;

/**
 * @author Squbi
 */
public interface GardensDeviceMapper extends BaseMapper<GardensDevice> {
    /**
     * 通过id查设备
     *
     * @param deviceId id
     * @return GardensDevice
     * @author Squbi
     * @date 2021/8/30 15:38
     */
    GardensDevice selectByDeviceId(int deviceId);

    /**
     * 通过类型获取设备
     *
     * @param deviceType 设备类型
     * @return GardensDevice
     * @author Squbi
     * @date 2021/8/31 17:08
     */
    List<GardensDevice> selectByDeviceType(int deviceType);

    /**
     * 根据查询条件查询设备
     *
     * @param dto 查询条件
     * @return GardensDevice
     * @author Squbi
     * @date 2021/9/1 14:40
     */
    List<GardensDevice> selectByDto(GardensDeviceDto dto);


    List<GardensDeviceAreaVo> selectJoinArea(GardensDeviceAreaDto dto);
}
